
package model.entity;

import java.net.InetAddress;

/**
 * Class User: describes the entity user
 * @author SIAGO HAPPI Christelle
 * @param  username : the login of the user
 * @param ipAdress : the IP address of the user
 */
public class User {

	
	private String username;
	private InetAddress ipAdress;

	/**
	 * The constructor of the class
	 * @param username
	 * @param ipAdress
	 */
	public User(String username, InetAddress ipAdress) {
		this.username = username;
		this.ipAdress = ipAdress;
	}

	/**
	 * 
	 * @return the username of a user
	 */
	public String getUsername() {
		return username;
	}

	/**
	 * assigns a username at a user
	 * @param username: the login of the user
	 */
	public void setUsername(String username) {
		this.username = username;
	}

	/**
	 * 
	 * @return the IP address of a user
	 */
	public InetAddress getIpAdress() {
		return ipAdress;
	}
	
	/**
	 * assign an IP address
	 * @param ipAdress: the IP address a user
	 */

	public void setIpAdress(InetAddress ipAdress) {
		this.ipAdress = ipAdress;
	}

	/**
	 * display the username
	 */
	public String toString() {
		String m = new String(this.username + "_@ip:"
				+ this.getIpAdress().toString());
		return m;
	}

}
